<?php 
define('RUN_KATANA', true);
require('../../includes/config.php');
$status    = $_REQUEST['status'];
$orderid   = intval($_REQUEST['orderId']);
$transact  = intval($_REQUEST['transaction']);
if(intval($_REQUEST['orderId']) == 0)
{ $orderid   = intval($_REQUEST['orderid']); }
if(intval($_REQUEST['transaction']) == 0)
{ $transact  = intval($_REQUEST['transact']); }
$com	   = 16;

if(intval($_REQUEST['c']) > 0)
{ $com = intval($_REQUEST['c']); }

if($_REQUEST['edit'] != '')
{ $edit .=  'edit='.$_REQUEST['edit']; }
if(intval($_REQUEST['ad']) > 0)
{ $ad .=  '&ad='.intval($_REQUEST['ad']); }

if(($edit != '') && ($ad != ''))
{ $AcceptURL = SITE_URL.'?c='.$com.'&edit=payment&action=payment_accept&orderid='.$orderid.'&transact='.$transact; }
else
{ $AcceptURL = SITE_URL.'c/'.$com.'/?action=payment_accept&orderid='.$orderid.'&transact='.$transact; }

if(($orderid > 0) && ($transact > 0))
{ 
	header('Location: '.$AcceptURL);
}
else
{
	if($orderid > 0)
	{ 
		$AcceptURL = SITE_URL.'?c='.$com.'&action=payment&orderid='.$orderid;
		header('Location: '.$AcceptURL); 
	}
	else
	{ header('Location: '.SITE_URL); echo SITE_URL; } 
}
?>